package my.oschina.net.design.commands;

public class TestCom {
	
	public static void main(String[] args)
	{
		Light light = new Light();
		Com com1 = new LightOnCommand(light);
		Com com2 = new LightOffCommand(light);
		
		ControlBar clb = new ControlBar();
		clb.setCommand(com1);
		clb.pressDown();
		
		clb.setCommand(com2);
		clb.pressDown();
	}
	

}
